package cn.lanqiao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import cn.lanqiao.entity.Judge_error;
@Mapper
public interface Judge_errorMapper {
	
	// 根据学生id展示错题
	@Select("select * from judge_error where studentId = #{studentId}")
	public List<Judge_error> findById(Integer studentId);

	// 根据题目id删除错题
	@Delete("delete from judge_error where questionId = #{questionId}")
	public int deleteById(Integer questionId);
	
	@Insert("insert into judge_error(questionId,subject,question,analysis,answer,studentId,errorAnswer) values(#{questionId},#{subject},#{question},#{analysis},#{answer},#{studentId},#{errorAnswer})")
    public int add(Judge_error judge);
}
